package cn.andrewlu.weexshell.weex.core;

import cn.andrewlu.weexshell.ui.NavFragment;
import cn.andrewlu.weexshell.ui.nav.BottomNavFragment;
import cn.andrewlu.weexshell.ui.nav.SinglePageFragment;
import cn.andrewlu.weexshell.ui.nav.SlideNavFragment;
import cn.andrewlu.weexshell.ui.nav.TopNavFragment;

/**
 * Created by andrewlu on 2017/6/10.
 */

public class NavPageFactory {
    public static NavFragment instanceOfNav(String navType) {
        switch (navType) {
            case NavType.TYPE_SINGLE_PAGE:
                return new SinglePageFragment();
            case NavType.TYPE_BOTTOM_NAV:
                return new BottomNavFragment();
            case NavType.TYPE_TOP_NAV:
                return new TopNavFragment();
            case NavType.TYPE_SLIDE_NAV:
                return new SlideNavFragment();
            default:
                break;
        }
        return null;
    }
}
